<?php

namespace app\schoolwall\controller;

use think\Controller;

class School extends Controller
{
    protected $SchoolModel = null;

    public function _initialize()
    {
        $this->SchoolModel = model('common/School/School');
    }

    //获取学校列表
    public function schoollist()
    {
        if ($this->request->isAjax())
        {
            $schoosl = $this->SchoolModel->select();

            if(!$schoosl)
            {
                return $this->error($this->SchoolModel->getError());
            }else{
                $this->success('获取成功', null, $schoosl);
            }
        }
    }
}
